package com.dowsure.apisaas.enums;

/**
 * @description: 布尔值
 * @author: Dowsure
 * @create: 2022-02-15 18:29
 **/
public enum BooleanEnums {

    TRUE("TRUE", "是"),

    FALSE("FALSE", "否");

    private String value;

    private String describe;

    BooleanEnums(String value, String describe){
        this.value = value;
        this.describe = describe;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }

    public static BooleanEnums fromValue(String text) {
        for (BooleanEnums b : BooleanEnums.values()) {
            if (String.valueOf(b.value).equals(text)) {
                return b;
            }
        }
        return null;
    }
}
